﻿using System;

namespace ShapeCalculator
{
    // 正方形类
    public class Square : IShape
    {
        public double SideLength { get; set; }

        public Square(double sideLength)
        {
            SideLength = sideLength;
        }

        public double CalculateArea()
        {
            return SideLength * SideLength;
        }

        public bool IsValid()
        {
            return SideLength > 0;
        }
    }
}